package com.piece.admin.model;

import com.piece.core.framework.support.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@NoArgsConstructor
@Table(name = "tb_sms_template")
@ApiModel(value = "短信模板配置表:tb_sms_template")
public class TbSmsTemplate extends BaseEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", length = 11)
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 参考：${@link com.piece.core.message.enums.SmsChannelType}
     */
    @Column(name = "channel_code", length = 50)
    @ApiModelProperty(value = "渠道编码")
    private String channelCode;

    @Column(name = "template_id", length = 128)
    @ApiModelProperty(value = "短信API模板编号")
    private String templateId;

    @Column(name = "template_code", length = 128)
    @ApiModelProperty(value = "模板编码")
    private String templateCode;

    @Column(name = "template_name", length = 128)
    @ApiModelProperty(value = "模板名称")
    private String templateName;

    @Column(name = "content", length = 255)
    @ApiModelProperty(value = "模板内容")
    private String content;

    @Column(name = "params", length = 255)
    @ApiModelProperty(value = "参数数组")
    private String params;

    @Column(name = "remark", length = 500)
    @ApiModelProperty(value = "备注")
    private String remark;

    @Column(name = "status", length = 1)
    @ApiModelProperty(value = "状态")
    private String status;
}
